import { reportError } from '../utils/request';

// vue 异常捕获
const start = (err, vm, info) => {
  const { name, message, stack } = err;
  reportError({
    type: 'vue',
    name,
    message,
    location: window.location.href,
    stack,
    // todo: 行号、列号、vm
    vueInfo: info
  });
};

export default start;
